package com.dayatang.hrm.compensation.policy;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

/**
 * 取最小值策略
 * 
 * @author chencao
 * 
 */
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("4")
public class MINCalculatePolicy extends DataCalculatePolicy {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7906564223894000498L;
	private static MINCalculatePolicy INSTANCE;

	private MINCalculatePolicy() {
	}

	public static MINCalculatePolicy getInstance() {
		if (INSTANCE == null) {
			INSTANCE = getDataCalculatePolicyRepository().findAllPolicy(
					MINCalculatePolicy.class).get(0);
		}
		return INSTANCE;
	}

}
